**
** FIGURE 7
**


use INPUT/size_distribution_data.dta, clear
 
bys products: egen share_uw=mean(share)

gen model_0065 = (1/products * 0.065*(1-0.065)^(products-1))/(0.065/(1-0.065)*ln(1/0.065) )  if products<=10

bys group: egen x=sum(model_0065)
egen xx=max(x)
replace model_0065=1-xx if products==12
drop x xx

sort products
twoway ///
(scatter share products, lp(solid) color(gray*0.3) symbol(Oh) lwidth(thick)) ///
(line share_uw products if products<=10, lp(solid) color(gray) lwidth(vthick)) ///
(line model_0065 products if products<=10, lp(dash) color(black) symbol(square) lwidth(vthick)) ///
(scatter share_uw products if products==12, lp(solid) color(gray) symbol(circle)) ///
(scatter model_0065 products if products==12, lp(solid) color(black) symbol(square)) ///
, ytitle("Share of Firms") xtitle("Number of Products") xlabel( 1 2 3 4 5 6 7 8 9 10 12, valuelabel angle(0))  ///
title("") ylabel(0(0.2)0.68) ///
legend(col(1) order(2 "Data" 3 "Model")) ///
graphregion(color(white)) plotregion(fcolor(white)) legend(region(lcolor(white)) pos(2) ring(0)) note("")
graph export OUTPUT/Figure7.eps, replace
